#include <iostream>
#include <vector>
using namespace std;
// mul函数
vector<int> mul(vector<int> &A, int &B)
{
    vector<int> C;
    int t = 0;
    for (int i = 0; i < A.size(); i++)
    {
        t += A[i] * B;
        C.push_back(t % 10);
        t /= 10;
    }
    //最后的也要加上，12*11 --> 132,结果大于A本来的位数
    if(t){
        C.push_back(t);
    }
    return C;
}
int main()
{
    string a;
    int B;
    cin >> a >> B; // a = "1,2,3,4,5,6"
    vector<int> A;
    for (int i = a.size() - 1; i >= 0; i--)
    {
        A.push_back(a[i] - '0'); //反序储存“a”---> A[6] ={6,5,4,3,2,1};
    }
    auto C = mul(A, B);
    for (int i = C.size() - 1; i >= 0;i--){
        cout << C[i];
    }

     return 0;
}